with Ada.Text_IO;           use Ada.Text_IO;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;

with Generic_Functions;     use Generic_Functions;

procedure Generic_Functions_Tests is

   -- | Variables
   Decoup_Test        : constant Int_Array(1..7) := (11, 19, 60, 24, 255, 10, 50);
   Test_Str_Arr       : Str_Array(Decoup_Test'Range);
   Test_Str_Arr2      : Str_Array(Decoup_Test'Range);
   Test_Str_Arr3      : Str_Array(Decoup_Test'Range);
   -- Test_Int        : Integer;
   Test_Handle        : File_Type;
   Test_Str           : String := "yehrjdkfiorltyqhazjr";
   Test_Str_Arr_Split : Str_Array(1..4);
   -- | end of Variables

begin

   Open(Test_Handle, In_File, "EXPORTFINAL.DAT");
   Test_Str_Arr  := Take_Enregistrements(Decoup_Test, Get_Line(Test_Handle));
   Test_Str_Arr2 := Take_Enregistrements(Decoup_Test, Get_Line(Test_Handle));
   Test_Str_Arr3 := Take_Enregistrements(Decoup_Test, Get_Line(Test_Handle));

   for I in Test_Str_Arr'Range loop
      Put_Line(To_String(Test_Str_Arr(I)));
   end loop;

   for I in Test_Str_Arr2'Range loop
      Put_Line(To_String(Test_Str_Arr2(I)));
   end loop;

   for I in Test_Str_Arr3'Range loop
      Put_Line(To_String(Test_Str_Arr3(I)));
   end loop;

   --  for I in Test_Str_Arr'Range loop
   --     Test_Int := To_String(Test_Str_Arr(I))'Length;
   --     Put_Line(Integer'Image(Test_Int));
   --  end loop;

   --  for I in Test_Str_Arr2'Range loop
   --     Test_Int := To_String(Test_Str_Arr2(I))'Length;
   --     Put_Line(Integer'Image(Test_Int));
   --  end loop;

   --  for I in Test_Str_Arr3'Range loop
   --     Test_Int := To_String(Test_Str_Arr3(I))'Length;
   --     Put_Line(Integer'Image(Test_Int));
   --  end loop;

   Test_Str_Arr_Split := Split_Str(Test_Str, 4, 5);
   for I in Test_Str_Arr_Split'Range loop
      Put_Line(To_String(Test_Str_Arr_Split(I)));
   end loop;

   Close(Test_Handle);

end Generic_Functions_Tests;
